<?php if (!defined('BASEPATH')) exit('No direct script access allowed');

require_once 'excel_reader2.php';

class Excel_Reader {
	
    private static $m_pInstance; 
    //private function __construct() {} 
    private $filename = "";


    public static function getInstance() 
    { 
        if (!self::$m_pInstance) 
        { 
            self::$m_pInstance = new Excel_Reader(); 
        } 
        return self::$m_pInstance; 
    } 
	
	public function setFilename($file){
		$this->filename = $file;
	}
	
	public function read(){
		$data = null;
		
		if($this->filename != "") {
			$data = new Spreadsheet_Excel_Reader($this->filename);
		}
		return $data;
	
	}
}